package edu.zjut.hjg.saas.biz.dao.impl;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import edu.zjut.hjg.saas.biz.dao.PriceTypeDao;
import edu.zjut.hjg.saas.biz.model.PriceType;

public class PriceTypeDaoImpl extends SqlMapClientDaoSupport implements PriceTypeDao {

    @Override
    public PriceType load(Integer id) {
        return (PriceType) getSqlMapClientTemplate().queryForObject("priceType.load", id);
    }

    @SuppressWarnings("unchecked")
    @Override
    public List<PriceType> listAll() {
        return getSqlMapClientTemplate().queryForList("priceType.listAll");
    }
}
